#include "../app/app_message.h"
#include "log/log.h"
#include <stdlib.h>

int main(int argc, char const *argv[])
{
    //测试数据
    char *json = "{\"connect_type\":1,\"device_id\":\"5858\",\"msg\":\"61626364\"}";
    //将json数据解析成char数组
    char msg[10]={0};
    int chars_len=app_message_JsonTochars(json,msg,10);
    log_debug("msg:%s\n",msg);
    //将char数组转换成json数据
    char *json2 = app_message_charsToJson(msg,chars_len);
    log_debug("json2:%s\n",json2);
    free(json2);
    return 0;
}

